package com.bestcem.xm.om.dao;

import com.bestcem.xm.om.entity.EmailBox;

import java.util.List;

/**
 * @author zq.ding <zq.ding@idiaoyan.com>
 * @version v1.0
 * @date 2021/11/18 13:30
 */
public interface EmailBoxDao {
    /**
     * 保存邮箱相关信息
     *
     * @param emailBox 邮箱实体类
     * @return MailBox
     * @author zq.ding <zq.ding@idiaoyan.com>
     * @date 2021/11/18 13:30
     */
    EmailBox save(EmailBox emailBox);

    /**
     * 根据账号名删除邮箱
     *
     * @param account 账号名
     * @return MailBox
     * @author zq.ding <zq.ding@idiaoyan.com>
     * @date 2021/11/18 13:30
     */
    Boolean deleteByAccount(String account);

    /**
     * 获取所有mailbox
     *
     * @return java.util.List
     * @author xuan.yang@idiaoyan.com
     * @date 2021/11/19 14:42
     */
    List<EmailBox> listMailBoxes();

    /**
     * 根据邮箱获取相关信息
     *
     * @param account 发件邮箱
     * @return com.bestcem.xm.om.entity.mongo.MailBox
     * @author xuan.yang@idiaoyan.com
     * @date 2021/11/30 17:45
     */
    EmailBox findByAccount(String account);

    /**
     * 更新
     *
     * @param emailBox
     * @return void
     * @author zhangfeng <feng.zhang@idiaoyan.com>
     * @date 2022/7/29 17:22
     */
    void update(EmailBox emailBox);
}
